<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport"
          content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <meta name="format-detection" content="telephone=no"/>
    <title>账单详情</title>
    <link rel="stylesheet" type="text/css" href="../../css/aui.css"/>
    <!-- <link rel="stylesheet" type="text/css" href="../../css/common.css"/> -->
    <link rel="stylesheet" type="text/css" href="../../css/style.css"/>
    <style>
        body {
            background: #fff;
            font-size: 14px;
        }

        .aui-icon-left {
            padding-left: 10px;
        }

        .aui-slide-page-active {
            background: #327afa;
        }

        /*        header {
                    width: 100%;
                    height: 45px;
                    background: #fff;
                    position: relative;
                    z-index: 9;
                    margin-bottom: 15px;
                }
                .win_title{
                    text-align: center;
                    width: 100%;
                    line-height: 45px;
                    height: 45px;
                    font-size: 16px;
                }*/
        .aui-iconfont {
            position: absolute;
        }

        .header {
            text-align: center;
        }

        .money {
            font-size: 28px;
        }

        li span {
            float: left;
            width: 20%;
            margin-right: 4%;
        }

        li div {
            text-align: right;
            width: 76%;
            float: left;
        }

        ul.aui-list-view {
            margin-top: 15px;
        }

        .aui-list-view-cell:after, .aui-list-view:after, .aui-list-view-cell:last-child:after {
            border: 0;
        }
    </style>
</head>
<body>
<header class="aui-bar aui-bar-nav aui-border-b">
    <div class="aui-pull-left aui-iconfont aui-icon-left icon-left-coler" tapmode onclick="closeWin()"></div>
    <div class="aui-title">账单详情</div>
</header>
<div class="contain" id="info-content">
    <!--<div class="header">-->
    <!--<span class="money">+368.00</span>-->
    <!--<p class="active">等待卖家发货</p>-->
    <!--</div>-->
    <!--<ul class="aui-list-view">-->
    <!--<li class="aui-list-view-cell" tapmode onclick="openToTwo('releaseCategory_win')">-->
    <!--<span>账单说明</span>-->
    <!--<div class="info">男式休闲裤修身直筒男式时尚拉链口袋五分裤沙袋五分滩裤等多种样式结账</div>-->
    <!--</li>-->
    <!--<li class="aui-list-view-cell tixianInfo" tapmode onclick="openToTwo('releaseCategory_win')">-->
    <!--<span>提现到</span>-->
    <!--<div class="info">中国农业银行(2541)  王尚</div>-->
    <!--</li>-->
    <!--<li class="aui-list-view-cell" tapmode onclick="openToTwo('releaseCategory_win')">-->
    <!--<span>创建时间</span>-->
    <!--<div class="time">2016-10-31 18:01:33</div>-->
    <!--</li>-->
    <!--<li class="aui-list-view-cell" tapmode onclick="openToTwo('releaseCategory_win')">-->
    <!--<span>订单号</span>-->
    <!--<div>20106212000400111001800612989821</div>-->
    <!--</li>-->
    <!--</ul>  -->
</div>
</body>
<script id="depositList-template" type="x-dot-template">
    <div class="header">
        <span class="money">-{{=it.amount}}</span>
        <p class="active">
            {{? it.status == 0}}
            等待受理
            {{?? it.status == 1}}
            拒绝申请
            {{?? it.status == 2}}
            提现失败
            {{?? it.status == 3}}
            提现成功
            {{?}}
        </p>
    </div>
    <ul class="aui-list-view">
        <li class="aui-list-view-cell">
            <span>账单说明</span>
            <div class="info">
                提现到银行卡
            </div>
        </li>
        <li class="aui-list-view-cell tixianInfo">
            <span>提现到</span>
            <div class="info">{{=it.bank}}　{{=it.truename}}</div>
        </li>
        <li class="aui-list-view-cell">
            <span>创建时间</span>
            <div class="time">{{=it.addtime}}</div>
        </li>
        <!--<li class="aui-list-view-cell">-->
            <!--<span>订单号</span>-->
            <!--<div>20106212000400111001800612989821</div>-->
        <!--</li>-->
    </ul>


</script>
<!--//订单详情-->
<script id="orderInfo-template" type="x-dot-template">
    <div class="header">
        <span class="money">+{{=it.order_amount}}</span>
        <p class="active">
            {{? it.status == 0}}交易关闭
            {{?? it.status == 1}}等待买家付款
            {{?? it.status == 2}}买家已付款
            {{?? it.status == 3}}卖家已发货
            {{?? it.status == 4}}交易成功
            {{?? it.status == 5}}已评价
            {{?? it.status == 6}}申请退款
            {{?? it.status == 7}}申请退货
            {{?}}
        </p>
    </div>
    <ul class="aui-list-view">
        <li class="aui-list-view-cell">
            <span>账单说明</span>
            <div class="info">
                {{=it.title}}
            </div>
        </li>
        <li class="aui-list-view-cell">
            <span>创建时间</span>
            <div class="time">{{=it.addtime}}</div>
        </li>
        <li class="aui-list-view-cell">
            <span>订单号</span>
            <div>{{=it.order_sn}}</div>
        </li>
    </ul>


</script>
<script type="text/javascript" src="../../script/api.js"></script>
<script type="text/javascript" src="../../script/common.js"></script>
<script type="text/javascript" src="../../script/doT.min.js"></script>
<script type="text/javascript" src="../../script/jquery-1.11.3.js"></script>
<script type="text/javascript">
    var type, orderId;
    apiready = function () {
        api.parseTapmode();
        type = api.pageParam.type;
        orderId = api.pageParam.orderId;
        if (type == "1") {
            orderInfo();
        } else {
            depositInfo();
        }
        var header = $api.dom('header');
        var footer = $api.dom('footer');
        $api.fixIos7Bar(header);
    }
    getStorageAll();
    function changePaw() {
        $(".contain").css({"display": "none"});
        $(".result").css({"display": "block"});
    }
    //提现明细
    function depositInfo() {
        showLoading();
        var data = {};
        var url = 'User/depositLogInfo/id/' + orderId + '/userName/' + user_name;
        ajaxRequest(url, 'get', "", function (ret, err) {
            if (ret.status == 1) {
                // alert(JSON.stringify(ret));
                var content = $api.byId('info-content');
                var tpl = $api.byId('depositList-template').text;
                var tempFn = doT.template(tpl);
                $api.append(content, tempFn(ret.msg));
                $(".contain").find(".time").each(function () {
                    $(this).text(stampToTime($(this).text()))
                })
            } else {
                api.toast({
                    msg: '已经加载完',
                    duration: 2000,
                    location: 'bottom'
                });
            }
        });
        hideLoading();
    }
    //提现明细
    function orderInfo() {
        showLoading();
        var data = {};
        var url = 'User/orderSupplierInfo/orderId/'+orderId+'/userName/' + user_name;
        ajaxRequest(url, 'get', "", function (ret, err) {
            if (ret.status == 1) {
//                alert(JSON.stringify(ret));
                var content = $api.byId('info-content');
                var tpl = $api.byId('orderInfo-template').text;
                var tempFn = doT.template(tpl);
                $api.append(content, tempFn(ret.msg));
                $(".contain").find(".time").each(function () {
                    $(this).text(stampToTime($(this).text()))

                })
            } else {
                api.toast({
                    msg: '已经加载完',
                    duration: 2000,
                    location: 'bottom'
                });
            }
        });
        hideLoading();
    }
</script>
</html>
